class Animal{
    constructor(name){
        this.name = name;
    }
    sayHi(){
        console.log(`${this.name}  打招呼`)
    }
}
class Dog extends Animal{
    constructor(name,type){
        super(name);
        this.type = type;
    }
    sayhi(){
        console.log(`${this.name} 汪汪汪`);
    }
}
// js 里的class extends super 只是语法糖 原型式的面向对象
const dog=new Dog('lwb','拉布拉多');
console.log(dog);
console.log(dog.__proto__);
console.log(dog.constructor);